home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / qlib205.zip / QLIB.ZIP / H / VIDEO.H < prev   
C/C++ Source or Header  |  1997-07-13  |  3KB  |  94 lines

  1. // see video.txt for what is returned and what is needed in regs
  2.  
  3. #ifndef __VIDEO_H__
  4. #define __VIDEO_H__
  5.  
  6. #include <stddef.h>
  7.  
  8. #include <vesa.h>
  9.  
  10. struct mouse_user {
  11.   word x;
  12.   word y;
  13.   word but;
  14. };
  15.  
  16. //FONT HEADER!!  Added in QLIB v1.1
  17. struct fnthead {
  18.   byte head[4];   //='FNT',27
  19.   word x;
  20.   word y;
  21.   byte bpp;   //bits / pixel  (ignored)
  22.   byte bypp;  //bytes / pixel
  23.   byte flg;   //(bit 1=mono-colored font - g_setfntcolor())
  24. };
  25.  
  26. #define G_TEXT 1
  27. #define G_VGA 2
  28. #define G_VESA 3
  29. #define G_MODEX 4
  30.  
  31. #ifdef __cplusplus
  32.   extern "C" {
  33. #endif
  34.  
  35. //video sub-system
  36. extern sdword g_getmode (word,word,byte);
  37. extern void g_setmode (void);
  38. extern sdword t_setmode (byte,byte);
  39. extern void *t_savestate (void);
  40. extern void t_restorestate (void *);
  41.  
  42. extern void g_copy (void);      //copies buffer to VRAM
  43. extern void g_setbuf (void *);
  44. extern void g_setpal (void *);  //768 bytes expected
  45. extern void g_setcol (byte n,byte r,byte g,byte b);
  46. extern void g_get (void *a,dword x1,dword y1,dword x2,dword y2);
  47. extern void g_put (void *a,dword x1,dword y1,dword x2,dword y2);
  48. extern void g_put0 (void *a,dword x1,dword y1,dword x2,dword y2);
  49. extern void g_waitvsync (void);      
  50.  
  51. extern sbyte mouse_init (void);
  52. extern void mouse_uninit (void);
  53. extern void mouse_setcursor (void *a,word x,word y,word hx,word hy);
  54. extern void mouse_setcursor_text (byte);
  55. extern void mouse_setspd (byte x,byte y);
  56. extern void mouse_setwin (dword x1,dword y1,dword x2,dword y2);
  57. extern void mouse_on (void);
  58. extern void mouse_off (void);
  59.  
  60. extern void mouse_setuser (dword,struct mouse_user*);
  61. extern void mouse_setpos (dword x,dword y);
  62.  
  63. extern byte * g_loadfnt (char *n);   //FIX v2.03 Beta #2
  64. extern void g_setfnt (void *);       //FIX v2.03 Beta #2
  65. extern void g_setfntcolor (dword);
  66. extern void g_putch (dword x,dword y,char ch);
  67. extern void g_printxy (dword x,dword y,char *s);
  68. extern void g_printf (dword x,dword y,char * s,...);
  69.  
  70. extern void g_hline (dword x1,dword y,dword x2,dword col);
  71. extern void g_vline (dword x1,dword y,dword x2,dword col);
  72. extern void g_box   (dword x1,dword y1,dword x2,dword y2,dword col);
  73. extern void g_boxfill (dword x1,dword y1,dword x2,dword y2,dword col);
  74. extern void g_cls (void);
  75.  
  76. extern dword _v_buffer;   //buffer you have alloc (set by gsetbuf())
  77. extern dword _v_linear;   //linear addr to VRAM (may not be 0a0000h under VESA 2.0)
  78.  
  79. //vesa
  80. extern sbyte vesa_init(void);
  81. extern void vesa_func06(void);
  82. extern void vesa_setstart(dword,dword);
  83. extern sbyte vesa_firstmode(void);
  84. extern sbyte vesa_nextmode(void);
  85.  
  86. extern struct vesa_infoblock vesa_info;
  87. extern struct vesa_modeinfoblock vesa_modeinfo;
  88.  
  89. #ifdef __cplusplus
  90.   }
  91. #endif
  92.  
  93. #endif
  94.